package com.controller;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mapper.TestMapper;
import com.one.Goods;
import com.service.BaseService;
import com.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by Likuo on 2018/8/24.
 *
 * @Description:
 */
@RestController
public class TestController {
    @Autowired
    TestMapper testMapper;

    @RequestMapping("aa")
    public String aa()
    {
        PageHelper.startPage(0,10);
        List list = testMapper.selectAll();


        return JSONArray.toJSONString(new PageInfo<Goods>(list));
    }
}
